
import {CHANGENAME, CHANGEINPUTTEL1, CHANGEDOORNUM,ADDRESS_200} from "../../actionType";
import axios from "../../../utils/myaxios";
const changeInputNameAction = (params) => ({
    type: CHANGENAME,
    params,
  });
const changeInputTelAction = (params) => ({
  type: CHANGEINPUTTEL1,
  params,
});
const changeDoorNumAction = (params) => ({
  type: CHANGEDOORNUM,
  params,
});
const handleSelectAction = (...value) => {
  // console.log(value);
  value[3][0]["detail"]=value[4]
  return function (dispatch) {
    axios.post('user/addNewAddress',{tagID:"10189351598495205000",userID:value[0],province:value[3][0].city,city:value[3][0].province,district:value[3][0].district,detail:value[3][0].detail}).then(res=>{
      // console.log(res);
      if(res.code===200){
        dispatch({
          type:ADDRESS_200,
          // userInfo:res.sqlQueryResults
        })
      }else{
       
      }
    })
  };

};

export {changeInputTelAction, changeInputNameAction, handleSelectAction ,changeDoorNumAction}
